package org.demo.controller;

import org.demo.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
@Api(tags = "用户接口")
@RestController
@RequestMapping("/student")
public class MyController {
	@Autowired
	private ApplicationContext ctx;
	
	@ApiOperation(value = "新增用户" ,httpMethod="POST")
	@PostMapping("/hello")
	@ResponseBody()
	@ApiResponses({@ApiResponse(code=200,response=User.class,message="success")})
	public User hello(User u) {
		
		return u;
	}
	

}

